package de.placidi.pressreview.textprocessing;

import java.io.IOException;

/**
 * The core public access point in order to analyze text fetched from html websites. 
 * Uses a library for text processing from the nlp group from the University of Stanford.  
 * Contains funcionality to do text cleansing. This is neccessary for further text processing. 
 * 
 * @author Alexander Placidi
 *
 */
public interface TextProcessor {
	
	/**
	 * A text cleansing method.
	 * Cuts unwanted expressions from a text. 
	 * 
	 * @param regEx
	 * 		A regular expression.
	 * 
	 */
	public void addExpressionToCut(String regEx);
	
	/**
	 * A text cleansing method. 
	 * Excludes a hole text, which contains unwanted expressions. 
	 * 
	 * @param regEx
	 * 		A regular expression.
	 */
	public void addExpressionToExclude(String regEx);
	
	/**
	 * Analyzes a text. Counts words and looks for the neighbors of words in a sentence. 
	 * 
	 * @return
	 * 		An object, which carries information about the analyzed text. 
	 * @throws IOException
	 */
	public StatisticWords getStatistics() throws IOException;
	
}
